package com.netas.kekmanager.dao;
import com.netas.kekmanager.dao.model.Source;
import com.netas.kekmanager.dao.model.SourcePk;
import com.netas.kekmanager.dao.exceptions.SourceDaoException;
import java.util.List;

public interface SourceDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return SourcePk
	 */
	public SourcePk insert(Source dto);

	/** 
	 * Updates a single row in the source table.
	 */
	public void update(SourcePk pk, Source dto) throws SourceDaoException;

	/** 
	 * Deletes a single row in the source table.
	 */
	public void delete(SourcePk pk) throws SourceDaoException;

	/** 
	 * Returns all rows from the source table that match the criteria 'id = :id'.
	 */
	public Source findByPrimaryKey(int id) throws SourceDaoException;

	/** 
	 * Returns all rows from the source table that match the criteria ''.
	 */
	public List<Source> findAll() throws SourceDaoException;

	/** 
	 * Returns all rows from the source table that match the criteria 'id = :id'.
	 */
	public List<Source> findWhereIdEquals(int id) throws SourceDaoException;

	/** 
	 * Returns all rows from the source table that match the criteria 'name = :name'.
	 */
	public List<Source> findWhereNameEquals(String name) throws SourceDaoException;

	/** 
	 * Returns the rows from the source table that matches the specified primary-key value.
	 */
	public Source findByPrimaryKey(SourcePk pk) throws SourceDaoException;

}
